﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using A2DFramework.OSGI;

namespace OSGIServiceHost
{
    partial class RuntimeService : ServiceBase
    {
        public RuntimeService()
        {
            InitializeComponent();
        }
        private BundleRuntime runtime;
        protected override void OnStart(string[] args)
        {
            runtime = new BundleRuntime();
            runtime.Start();
        }

        protected override void OnStop()
        {
            if (this.runtime != null)
            {
                this.runtime.Stop();
                this.runtime.Dispose();
                this.runtime = null;
            }
        }
    }
}
